package com.ssy.lingxi.dataauth.config;

import com.ssy.lingxi.dataauth.annotation.common.HasDataAuthResolver;
import org.springframework.stereotype.Component;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;
import java.util.List;

/**
 * 判断是否有数据权限参数注解配置
 * @author 万宁
 * @version 2.0.0
 * @date 2021-12-30
 */
@Component
public class DataAuthConfig implements WebMvcConfigurer {

    @Resource
    private HasDataAuthResolver hasDataAuthResolver;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(hasDataAuthResolver);
    }
}
